<?php
	include_once '../../conn/all.php';
	//$id=$_GET['id'];
	$class=$_GET['class'];
	$user="admin";
	$res=sql("s", "leave_msg", "*","where class=$class");
?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="../templates/met/images/css/reset.css" rel="stylesheet" />
<link rel="stylesheet" type="text/css" href="../templates/met/images/css/metinfo.css" />
<script type="text/javascript"src="../include/metvar.js"></script>
<script type="text/javascript" src="../include/metinfo.js"></script>
<script type="text/javascript" src="../../public/js/metinfo-min.js"></script>
<script type="text/javascript" src="../templates/met/images/js/iframes.js"></script>
<script type="text/javascript" src="../templates/met/images/js/cookie.js"></script>
<style type="text/css">
body{
	font-size: ; 
	font-family:;
	text-align:center;
}
</style>
<script type="text/javascript">
//ajax执行时间
var time=200;
var lang = 'cn';
var metimgurl='../templates/met/images/';
</script>
<script type="text/javascript">
	$(document).keypress(function(e){  
	var type = e.keyCode||e.which||e.charCode;
		if(type==27){ 		
			parent.sitemp('set/sitemap.php?lang=cn&admintp=&langset=cn');  
		}				
	});
</script>

<title>留言信息管理</title>
</head>
<body>
<table cellpadding="2" cellspacing="1" class="table">
          <tr> 
            <td colspan="3" class="title">反馈信息管理</td>
          </tr>
      <tr>
 <td align="left" class="centle" colspan="3">
 			<form method="POST" name="myform" style="float:left; margin-right:5px; font-weight:normal; color:#666;" action="index.php?search=detail_search&lang=cn" target="_self">
			    &nbsp;&nbsp;<input name="useinfo" type="text" />
  <input type="submit" name="Submit2" value="搜索" class="submit" />  
	        请输入留言信息用户回复关键词。如果为空，则查找所有留言信息。</form>
			<div style="float:right; margin-right:5px; font-weight:normal;" >
 			    <b>留言信息分类</b>&nbsp;<select name="new" id="new" onChange="changes($(this));">
					<option value="index.php?search=&useinfo=&lang=cn" style='color:#FF0000'>所有信息</option>
					<option value="index.php?search=&readok=0&useinfo=&lang=cn" >未回复信息</option>
					<option value="index.php?search=&readok=1&useinfo=&lang=cn" >已回复信息</option>
				</select>
</div> 
</td> 
</tr>
	  	<tr>
			 <td colspan="3">
			  <form name="del" method="Post" action="delete.php?lang=cn">
			  <table cellpadding="0" cellspacing="0" class="table neitable" style="margin:0px; border:none;">
              <tr>
                <td width="40" class="list">选择</td>
				<td width="50" class="list">ID</td>
				<td class="list" >留言者身份</td>
                <td class="list">名称</td>
				<td class="list">电话</td>
				<td  class="list">email</td>
				<td class="list" >是否通过审核</td>                
                <td class="list" >提交时间</td>
 
				<td class="list" >操作</td>
              </tr>
 <?php 
	$level=arrayLevel($res);
	if ($level==1) {
		$info=$res;
		echo '<tr class="mouse click">';
		echo ' <td class="list-text"><input name="id" type="checkbox" id="id" value="3" /></td>';
		echo '<td class="list-text">'.$info['id'].'</td>';
		echo '<td class="list-text" >'.$info['user'].'</td>';
		echo '<td class="list-text" >'.$info['name'].'</td>';
		echo '<td class="list-text" >'.$info['tel'].'</td>';
		echo '<td class="list-text" >'.$info['email'].'</td>';
		echo '<td class="list-text" >'.$info['see'].'</td>';
		echo '<td class="list-text" >'.$info['time'].'</td>';
		echo '<td class="list-text"><a href="leave_edit.php?&id='.$info['id'].'">查看</a>&nbsp;&nbsp;<a href="../control.php?oper=leave_del&id='.$info['id'].'&class='.$info['class'].'"  >删除</a></td>';
		echo '</tr>';
	}elseif($level>1){
		foreach ($res as $info){
			echo '<tr class="mouse click">';
			echo ' <td class="list-text"><input name="id" type="checkbox" id="id" value="3" /></td>';
			echo '<td class="list-text">'.$info['id'].'</td>';
			echo '<td class="list-text" >'.$info['user'].'</td>';
			echo '<td class="list-text" >'.$info['name'].'</td>';
			echo '<td class="list-text" >'.$info['tel'].'</td>';
			echo '<td class="list-text" >'.$info['email'].'</td>';
			echo '<td class="list-text" >'.$info['see'].'</td>';
			echo '<td class="list-text" >'.$info['time'].'</td>';
			echo '<td class="list-text"><a href="leave_edit.php?&id='.$info['id'].'">查看</a>&nbsp;&nbsp;<a href="../control.php?oper=leave_del&id='.$info['id'].'&class='.$info['class'].'"  >删除</a></td>';
			echo '</tr>';
		}
	
	}
?>		         
         
		<tr>
		  <td class="footer" colspan="3"> </td>
	  </tr>
</table>
</body>
</html>
